package org.uranus.webauth.fido.uranus.util;

import java.security.SecureRandom;

import com.yubico.webauthn.data.ByteArray;

/**
 * @author lwl
 * @date 2020/5/27 11:31
 */
public class UranusUtil {

	private static final SecureRandom random = new SecureRandom();

	public static ByteArray generateRandom(int length) {
		byte[] bytes = new byte[length];
		random.nextBytes(bytes);
		return new ByteArray(bytes);
	}

	public static byte[] generateRandomByte(int length) {
		byte[] bytes = new byte[length];
		random.nextBytes(bytes);
		return bytes;
	}

}
